package com.zlx.mall.biz.order.controller;

import com.zlx.mall.basic.annotations.ValidateToken;
import com.zlx.mall.basic.web.model.BaseRequest;
import com.zlx.mall.basic.web.model.BaseResponse;
import com.zlx.mall.biz.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author xiatian
 * @Date 2025/3/23 星期日 19:44
 * @注释
 */
@RestController
public class OrderController {
    @Autowired
    private IOrderService orderService;


    @ValidateToken
    @PostMapping("/api/order/create")
    public BaseResponse create(BaseRequest request) {
        return orderService.create(request);
    }

    @ValidateToken
    @PostMapping("/api/order/check")
    public BaseResponse check(BaseRequest request) {
        return orderService.check(request);
    }

    @ValidateToken
    @PostMapping("/api/order/list")
    public BaseResponse list(BaseRequest request) {
        return orderService.list(request);
    }

    @ValidateToken
    @PostMapping("/api/receive/update")
    public BaseResponse receiveUpdate(BaseRequest request) {
        return orderService.receiveUpdate(request);
    }
}
